<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSongTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('song', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('singer_id')->default(0)->comment('歌手id');
            $table->string('song_name')->comment('歌曲名称');
            $table->string('file_url')->comment('音频地址');
            $table->timestamp('deleted_at')->nullable()->default(null);
            $table->timestamps();
        });
        DB::statement("ALTER TABLE `song` comment '歌曲表'");//表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('song');
    }
}
